import request from '@/utils/request/index.js'
export default {
	//查询参与供应商列表
	queryCompanyList(data){
	    return request.request({
			url: '/h5/noccloudhome/list',
			method: 'post',
			data: data,
		})
	},
	//查询参展商总数
	getCanzhanCount(tid){
		return request.request({
			url: '/h5/noccloudhome/canzhanCount',
			method:'post',
			data:{
				id : tid,
			}
		})
	},
	//查询视频列表
	getVideoList(tid){
		return request.request({
			url:'/h5/nocvideo/getExhibitionVideo?exhibitionId=' + tid,
			method: 'post',
		})
	},
	//查询直播列表
	getLiveList(tid){
		return request.request({
			url:'/h5/noccloudhome/getExhibitionLive?exhibitionId=' + tid,
			method:'post',
		})
	},
	//查询点选关键字
	getSearchProductClassify(tid){
		return request.request({
			url:'/h5/searchproductclassify/searchProClaList',
			method:'post',
			data:{
				exhibitionId :tid
			}
		})
	},
	//查询轮播图列表
	getBannerList(tid){
		return new Promise((resolve,reject)=>{ 
			request.request({
				url:'/h5/baseexhibitionbanner/' + tid,
				method:'get',
			}).then(res =>{
				resolve(res.data.list)
			})
		})
		
	},
	//展厅页面点赞视频
	giveVideoLike(userId,id){
		return request.request({
			url:'/h5/nocyxcollect/save',
			method:'post',
			data:{
				userId:userId,
				type:5,
				businessId:id
			},
		})
	},
	//展厅页面取消点赞视频
	cancelVideoList(like){
		return request.request({
			url:'/h5/nocyxcollect/cancelCollection',
			method:'post',
			data:{
				collectionId:like.id
			},
		})
	},
	//当前登录用户已经报名该场展会
	ifJoinExhibition(userId,exhibitionId){
		return request.request({
			url:'/h5/exhibition/ifJoinExhibition',
			method:'post',
			data:{
				userId:userId,
				exhibitionId:exhibitionId
			},
		})
	},
	/**
	 * 查询是否已经注册门票
	 * @param nocTemplateId
	 * @returns {*}
	 */
	hasSignUp(nocTemplateId){
		return request.request({
			url:'/h5/exhibition/hasSignUpExhibition',
			method:'post',
			data:{
				tid: nocTemplateId
			}
		})
	}
	
}
